using System;

using Microsoft.Xna.Framework;

namespace Elephant.Utility
{
    public sealed class GameHelper
    {
        #region Singleton Pattern Implementation

        static readonly GameHelper instance = new GameHelper();

        private GameHelper() { }

        #endregion

        Game game;
        
        public static Game Game
        {
            get
            {
                return instance.game;
            }
            set
            {
                instance.game = value;
            }
        }

        public static T GetService<T>()
        {
            T t = (T)Game.Services.GetService(typeof(T));

            return t;
        }
    }
}
